<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>学生排课</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="__PUBLIC__/css/layui.css"  media="all">
    <link rel="stylesheet" href="__PUBLIC__/css/public.css"  media="all">
    <link rel="stylesheet" href="__PUBLIC__/css/looklayer.css"  media="all">
    <style>
        .layui-layer-setwin .layui-layer-close2  {
            position: relative !important;
            right: 0!important;
            top:0 !important;
        }

    </style>
</head>
<body>
<div class="layui-conter">
    <div class="layui-col-md12">
        <div class="navigation">
            <span>教务></span><span>学生排课</span>
        </div>
        <div>
            <div>
				<div class="title-blue">班级信息</div>
				<div class="layui-table-box" style="margin-bottom: 20px">
						<div class="layui-table-body layui-table-main">
								<table cellspacing="0" cellpadding="0" border="0" class="layui-table">
										<thead>
										<tr>
												<th data-field="classNum">
														<div class="layui-table-cell laytable-cell-1-classNum">
																<span>班号</span>
																</span>
														</div>
												</th>
												<th data-field="className">
														<div class="layui-table-cell laytable-cell-1-className" align="center">
																<span>班级名称</span>
														</div>
												</th>
												<th data-field="classType">
														<div class="layui-table-cell laytable-cell-1-classType" align="center">
																<span>相关课程</span>
														</div>
												</th>
												<th data-field="startTime">
														<div class="layui-table-cell laytable-cell-1-startTime" align="center">
																<span>开课时间</span>
														</div>
												</th>
												<th data-field="number">
														<div class="layui-table-cell laytable-cell-1-number" align="center">
																<span>报名人数</span>
														</div>
												</th>
												<th data-field="teacher">
														<div class="layui-table-cell laytable-cell-1-teacher" align="center">
																<span>老师</span>
														</div>
												</th>
												<th data-field="director">
														<div class="layui-table-cell laytable-cell-1-director" align="center">
																<span>班主任</span>
														</div>
												</th>
												<th data-field="campus">
														<div class="layui-table-cell laytable-cell-1-campus" align="center">
																<span>校区</span>
														</div>
												</th>
										</tr>
										</thead>
										<tbody>
										<tr data-index="0" class="">
												<td data-field="classNum" align="center">
														<div class="laytable-cell-1-classNum">{$class_list.class_num}</div>
												</td>
												<td data-field="className" align="center">
														<div class="laytable-cell-1-className">{$class_list.classname}</div>
												</td>
												<td data-field="classType" align="center">
														<div class="laytable-cell-1-classType">{$class_list.lecturename}</div>
												</td>
												<td data-field="startTime" align="center">
														<div class="laytable-cell-1-startTime">
															{$class_list.start_time}
														</div>
												</td>
												<td data-field="number" align="center">
														<div class="laytable-cell-1-number" style="color: red;">{$class_list.number}/{$class_list.enrollment_number}</div>
												</td>
												<td data-field="teacher" align="center">
														<div class="laytable-cell-1-teacher">{$class_list.teachername}</div>
												</td>
												<td data-field="director" align="center">
														<div class="laytable-cell-1-director"> {$class_list.headmastername}
														</div>
												</td>
												<td data-field="campus" align="center">
														<div class="laytable-cell-1-campus"> {$class_list.xname}  </div>
												</td>
										</tr>
										</tbody>
								</table>
						</div>
				</div>
                <div class="white-conter">
                    <div class="title-blue">学员名单</div>
                    <div class="layui-form layui-border-box layui-table-view layui-col-md12" lay-filter="LAY-table-1">
                        <div class="layui-form-item">
                            <label class="laber-1">学生检索：</label>
                            <div class="layui-col-xs4">
                            		<input style="background: #dce6f0;border: none" id="student_key" type="text" name="title" lay-verify="title" autocomplete="off" placeholder="姓名/编号/电话" class="layui-input">
                            </div>
                            <div class="layui-inline search-1">
                                <button class="layui-btn layui-btn-sm layui-btn-normal" onclick="student_search();">搜索</button>
                            </div>
                        </div>
						<form class="layui-form" action="{:U('Classsetting/studentclass')}" method="post">
                        <input type="hidden" name="class_id" value="{$class_list.id}">
						<div class="layui-table-box" style="margin: 20px 50px 0 0">
                            <div class="layui-table-body layui-table-main layui-col-md10" style="padding-bottom: 40px">
                                <table cellspacing="0" cellpadding="0" border="0" class="layui-table">
                                    <thead>
                                    <tr>
                                        <th data-field="0" data-unresize="true">
                                            <div class="laytable-cell-1-0 laytable-cell-checkbox">
                                                 <input type="checkbox" name="0" class="all" lay-skin="primary" lay-filter="allChoose"/>
                                            </div>
                                        </th>
                                        <th data-field="id">
                                            <div class="laytable-cell-3-id" align="center">
                                                <span>学生编号</span>
                                            </div>
                                        </th>
                                        <th data-field="name">
                                            <div class="laytable-cell-3-name" align="center">
                                                <span>学生姓名</span>
                                            </div>
                                        </th>
										<th data-field="phone">
												<div class="laytable-cell-3-name" align="center">
														<span>联系电话</span>
												</div>
										</th>
										<th data-field="phone">
												<div class="laytable-cell-3-name" align="center">
														<span>跟踪销售</span>
												</div>
										</th>
                                    </tr>
                                    </thead>
                                    <tbody>
									<foreach name="student" item="s">
                                    <tr data-index="0" class="">
                                        <td data-field="0">
                                            <div class="laytable-cell-1-0 laytable-cell-checkbox">
                                                <input type="checkbox" value="{$s.id}" name="all[]" lay-skin="primary"/>
                                            </div>
                                        </td>
                                        <td data-field="id" align="center">
                                            <div class="laytable-cell-3-id">{$s.student_id}</div>
                                        </td>
                                        <td data-field="name" align="center">
                                            <div class="laytable-cell-3-name">{$s.name} </div>
                                        </td>
										<td data-field="phone" align="center">
												<div class="laytable-cell-3-name">{$s.phone} </div>
										</td>
										<td data-field="phone" align="center">
												<div class="laytable-cell-3-name">{$s.xs_name} </div>
										</td>
                                    </tr>
									</foreach>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="layui-col-md12" style="margin-top: 20px">
                            <div class="button-block">
                                <button class="layui-btn layui-btn-xs layui-btn-normal" lay-submit="" >添加学员</button>
                                <a href="javascript:window.location.href='{:U('Classsetting/classList')}'"  class="layui-btn layui-btn-xs btn-grey">取消</a>
                            </div>
                        </div>
						</form>
                    </div>
					<div class="title-blue">班级成员</div>
					<div class="layui-table-box" style="margin-bottom: 20px">
							<div class="layui-table-body layui-table-main">
									<table cellspacing="0" cellpadding="0" border="0" class="layui-table">
											<thead>
											<tr>
													<th data-field="id">
														<div  align="center">
															<span>学生编号</span>
														</div>
													</th>
													<th data-field="name">
														<div align="center">
															<span>学生姓名</span>
														</div>
													</th>
													<th data-field="phone">
															<div  align="center">
																	<span>联系电话</span>
															</div>
													</th>
													<th data-field="phone">
															<div  align="center">
																	<span>跟踪销售</span>
															</div>
													</th>
													<th data-field="operation">
															<div  align="center">
																	<span>操作</span>
															</div>
													</th>
											</tr>
											</thead>
											<tbody>
											<foreach name="student_show" item="s">
											<tr data-index="0" class="">
												<td data-field="id" align="center">
													<div class="laytable-cell-3-id">{$s.student_id}</div>
												</td>
												<td data-field="name" align="center">
													<div class="laytable-cell-3-name">{$s.name} </div>
												</td>
												<td data-field="phone" align="center">
														<div class="laytable-cell-3-name">{$s.phone} </div>
												</td>
												<td data-field="phone" align="center">
														<div class="laytable-cell-3-name">{$s.xs_name} </div>
												</td>
												<td data-field="operation" align="center">
														<div class="layui-table-cell laytable-cell-1-operation">
															<a href="{:U('Classsetting/removestudent?id='.$s['id'].'&classid='.$class_list['id'])}" ><img src="__PUBLIC__/images/out.png"></a>
														</div>
												</td>
											</tr>
											</foreach>
											</tbody>
									</table>
							</div>
					</div>
                </div>
            </div>
        </div>

    </div>

</div>






<script src="__PUBLIC__/js/layui.all.js" charset="utf-8"></script>
<script src="__PUBLIC__/js/js.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->

<script>
    layui.use('element', function(){
        var $ = layui.jquery
            ,element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块
        //触发事件
        var active = {
            tabChange: function(){
                //切换到指定Tab项
                element.tabChange('demo', '22'); //切换到：用户管理
            }
        };


    });
</script>
<script>
    layui.use( ['form','layer','laydate','element'], function(){
        var  form = layui.form
            , $ = layui.jquery
            ,layer = layui.layer
            ,element = layui.element
            , laydate = layui.laydate;
        //触发事件
            laydate.render({
                elem: '#signTime'
            });
				//全选
				form.on('checkbox(allChoose)', function(data){
            var child = $(data.elem).parents(".layui-col-md10").find('input[type="checkbox"]');
						child.each(function(index, item){
							item.checked = data.elem.checked;
						});
						form.render('checkbox');
				});
				form.render();
    });
</script>
</body>
</html>
